import Main from '@/components/main'
import parentView from '@/components/parent-view'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  title: { String|Number|Function }
 *         显示在侧边栏、面包屑和标签栏的文字
 *         使用'{{ 多语言字段 }}'形式结合多语言使用，例子看多语言的路由配置;
 *         可以传入一个回调函数，参数是当前路由对象，例子看动态路由和带参路由
 *  hideInBread: (false) 设为true后此级路由将不会出现在面包屑中，示例看QQ群路由配置
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面在切换标签后不会缓存，如果需要缓存，无需设置这个字段，而且需要设置页面组件name属性和路由配置的name一致
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  beforeCloseName: (-) 设置该字段，则在关闭当前tab页时会去'@/router/before-close.js'里寻找该字段名对应的方法，作为关闭前的钩子函数
 * }
 */

export default [
  {
    path: '/',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/home',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: false,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: false,
          title: '首页',
          notCache: true,
          icon: 'md-home'
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  {
    path: '/list',
    name: 'list',
    component: Main,
    meta: {
      hideInBread: true
    },
    children: [
      {
        path: 'index',
        name: '人员信息',
        meta: {
          icon: 'ios-book',
          title: '人员信息'
        },
        component: () => import('@/view/list/list.vue')
      }
    ]
  },
  {
    path: '/info',
    name: 'info',
    component: Main,
    meta: {
      hideInMenu: true
    },
    children: [
      {
        path: 'index',
        name: '详细信息',
        meta: {
          icon: 'ios-book',
          title: '详细信息'
        },
        component: () => import('@/view/info/info.vue')
      }
    ]
  },
  {
    path: '/serach',
    name: 'serach',
    component: Main,
    meta: {
      hideInBread: true
    },
    children: [
      {
        path: 'index',
        name: '人员搜索',
        meta: {
          icon: 'ios-book',
          title: '人员搜索'
        },
        component: () => import('@/view/serach/serach.vue')
      }
    ]
  },
  {
    path: '/log',
    name: 'log',
    component: Main,
    meta: {
      hideInBread: true
    },
    children: [
      {
        path: 'index',
        name: '奖罚记录',
        meta: {
          icon: 'ios-book',
          title: '奖罚记录'
        },
        component: () => import('@/view/log/log.vue')
      }
    ]
  },
  {
    path: '/jslog',
    name: 'jslog',
    component: Main,
    meta: {
      hideInBread: true
    },
    children: [
      {
        path: 'index',
        name: '晋升记录',
        meta: {
          icon: 'ios-book',
          title: '晋升记录'
        },
        component: () => import('@/view/jslog/jslog.vue')
      }
    ]
  },
  {
    path: '/departement',
    name: 'departement',
    component: Main,
    meta: {
      hideInBread: true
    },
    children: [
      {
        path: 'index',
        name: '部门管理',
        meta: {
          icon: 'ios-book',
          title: '部门管理'
        },
        component: () => import('@/view/departement/departement.vue')
      }
    ]
  },
  {
    path: '/level',
    name: 'level',
    component: Main,
    meta: {
      hideInBread: true
    },
    children: [
      {
        path: 'index',
        name: '晋升级别',
        meta: {
          icon: 'ios-book',
          title: '晋升级别'
        },
        component: () => import('@/view/level/level.vue')
      }
    ]
  },
  {
    path: '/fbt',
    name: '大数据分析图',
    component: Main,
    meta: {
      hideInBread: true,
      title: '大数据分析图',
      icon: 'ios-book'
    },
    children: [
      // {
      //   path: 'fbt',
      //   name: '员工分布',
      //   meta: {
      //     icon: 'ios-book',
      //     title: '员工分布'
      //   },
      //   component: () => import('@/view/fbt/fbt.vue')
      // },
      {
        path: 'nvfbt',
        name: '男女比例分布图',
        meta: {
          icon: 'ios-book',
          title: '男女比例分布图'
        },
        component: () => import('@/view/fbt/nvfbt.vue')
      },
      {
        path: 'nlfbt',
        name: '年龄分布图',
        meta: {
          icon: 'ios-book',
          title: '年龄分布图'
        },
        component: () => import('@/view/fbt/nlfbt.vue')
      },
      {
        path: 'glfbt',
        name: '工龄分布图',
        meta: {
          icon: 'ios-book',
          title: '工龄分布图'
        },
        component: () => import('@/view/fbt/glfbt.vue')
      },
      {
        path: 'xlfbt',
        name: '学历分布图',
        meta: {
          icon: 'ios-book',
          title: '学历分布图'
        },
        component: () => import('@/view/fbt/xlfbt.vue')
      },
      {
        path: 'dyzbt',
        name: '党员占比图',
        meta: {
          icon: 'ios-book',
          title: '党员占比图'
        },
        component: () => import('@/view/fbt/dyzbt.vue')
      },
      {
        path: 'dlfbt',
        name: '党龄占比图',
        meta: {
          icon: 'ios-book',
          title: '党龄占比图'
        },
        component: () => import('@/view/fbt/dlfbt.vue')
      },
      {
        path: 'gxfbt',
        name: '年龄区间各项分布图',
        meta: {
          icon: 'ios-book',
          title: '年龄区间各项分布图'
        },
        component: () => import('@/view/fbt/gxfbt.vue')
      },
      {
        path: 'fbt2',
        name: '人员异动趋势图',
        meta: {
          icon: 'ios-book',
          title: '人员异动趋势图'
        },
        component: () => import('@/view/fbt2/fbt2.vue')
      },
      {
        path: 'fbt3',
        name: '区县分局人数对比图',
        meta: {
          icon: 'ios-book',
          title: '区县分局人数对比图'
        },
        component: () => import('@/view/fbt2/fbt3.vue')
      }
    ]
  }
]
